<%@ page language="java"  pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改岗位</title>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/demo.css" type="text/css"></link>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/validform/css/style.css" type="text/css"></link>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/admin/css/add.css" type="text/css"></link>
<link rel="stylesheet" href="<%=request.getContextPath() %>/resources/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"></link>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/zTree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/zTree/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" >
	$.ajax({
		    url: "<%=request.getContextPath() %>/functionMenu!searchFunctionMenu.action?roleid=${request.resultMap.info.id}",type: "post", dataType: "json", 
		    success: function (data, textStatus) {  
		   	 	var json = eval("(" + data + ")");
		   	 	 if (json.STATUS > 0) { 
		   	 		$.fn.zTree.init($("#tree"), setting, json.functionMenu);
		   	 	}else{
		   	 		alert("加载功能菜单失败!");
		   	 	}
		     },
		    beforeSend: function () {},
		    error: function (XMLHttpRequest, textStatus, errorThrown) {alert("操作失败!"); },
		    complete: function (XMLHttpRequest, textStatus, errorThrown) {
		    	zTree= $.fn.zTree.getZTreeObj("tree");
				zTree.setting.check.chkboxType = { "Y":"ps", "N":"ps"};
				showCode('setting.check.chkboxType = { "Y" : "ps", "N" : "ps" };');
		    }
		});
 </script>


</head>
<body>
  <form  id="myForm" name="myForm"  action="<%=request.getContextPath() %>/role!updateRole.action" suc_url="<%=request.getContextPath() %>/role!searchRole.action?page=${request.curPage }" class="myform"   >
  	<div id="inside_content"> 
		<div id="dynamic">你现在所在的位置：岗位管理>>修改岗位</div>
		<div id="add_content">
			<div id="add_title">
				&nbsp;修改岗位
				<ul>
					<li><input type="submit" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add.png) top left no-repeat;"/></li>
					<li><input type="reset" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_reset.png) top left no-repeat;"/></li>
					<li><input  onclick="back();" type="button" value="" style="background: url(<%=request.getContextPath() %>/resources/admin/images/add_return.png) top left no-repeat;"/></li>
				</ul>
			</div>
			<table id="table_content"  >
				<tr>
		 			<td >岗位名称</td>
		 			<td style="width: 200px;">
		 				<input  id="rolename" name="rolename" value="${request.resultMap.info.rolename }"  type="text"  class="inputxt" datatype="*" nullmsg="请输入岗位名称"   />
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td >岗位级别</td>
		 			<td >
		 				<input  id="orderid" name="orderid"  type="text" value="${request.resultMap.info.orderid }" class="inputxt" datatype="n" nullmsg="请输入岗位排序"   />
		 			</td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td>岗位描述</td>
		 			<td ><textarea id="remark" name="remark" style="height: 150px;"  >${request.resultMap.info.remark }</textarea> </td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
	 			<tr>
		 			<td>岗位菜单</td>
		 			<td ><ul id="tree" class="ztree"></ul></td>
		 			<td class="Validform_checktip"></td>
	 			</tr>
			</table>
			<div class="clear"></div>
		</div>
	</div>
	<input  id="id" name="id" value="${request.resultMap.info.id }"  type="hidden"     />
	<textarea id="functionMenuStr" name="functionMenuStr" style="display: none;"  ></textarea>
</form>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/jquery.form.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/validform/js/Validform_v5.3.2.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/common.js"></script>
 <script type="text/javascript"  src="<%=request.getContextPath() %>/resources/js/model/role.js"></script>
</body>
</html>